package cn.wit.summit.chwan.utils;

import android.app.Activity;
import android.view.WindowManager;
import android.widget.EditText;

/**
 * Created by yangg on 2018/5/21.
 */

public class ShowSoftInputUtil {

    public static void showSoftInputFromWindow(Activity activity, EditText editText) {
        editText.setFocusable(true);
        editText.setFocusableInTouchMode(true);
        editText.requestFocus();
        activity.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
    }
}
